<script setup>
import { FileDoneOutlined } from '@ant-design/icons-vue'
import { message } from 'ant-design-vue'
defineProps([
  'item',
])
const loading = ref(false)
const handle = async () => {
  loading.value = true
  setTimeout(() => {
    loading.value = false
    message.error('查询失败！')
  }, 2000)
}
</script>

<template>
  <div class="xcsj-bar-item">
    <div class="icon-box">
      <FileDoneOutlined class="icon" style="color: #fff;" />
    </div>
    <div class="label">
      月销/收货:
    </div>
    <div class="content">
      <div v-if="loading" style="height: 20px;width:24px;overflow: hidden;display: inline-block;">
        <a-spin size="small" style="width: 20px;height: 20px;" />
      </div>
      <a-button v-else type="link" size="small" style="font-size: 12px" @click="handle">
        点击查询
      </a-button>
    </div>
  </div>
</template>

<style scoped>

</style>
